<!DOCTYPE html>  
<html>  
<head>  
    <meta charset="utf-8">  
    <title>采样情况——地图</title>  
    <!-- 引入 echarts.js -->  
    <script type="text/javascript" src="../../resources/echarts/echarts.min.js"></script>
    <script src="../../resources/jquery-easyui-1.5.4/jquery.min.js"></script>  
</head>  
<body>  
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->  
    <div id="main" style="width: 800px;height:700px;background-color: white;" align="center" ></div>  
    <script type="text/javascript">  
	    var app = {};
    	$.get('../../resources/echarts/mapjson/430100.json', function (cSjson) {  
        echarts.registerMap('长沙', cSjson);  
        var myChart = echarts.init(document.getElementById('main'));  
        myChart.showLoading({
		　　text : 'loading',
		　　effect : 'whirling' 
		});
        
        $.ajax({
            url: "/csfy/report/findReportGauge.do",
            type: "post",
            dataType: "json",
            success: function (data) {
                if (data.code == '200') {
                	var option = eval("(" + data.rows.gauge1 + ")");
                	myChart.hideLoading();
                	myChart.setOption(option);
                }else {
                	alert("系统错误");
                }
            },
            error: function (err) {
                alert('网络错误!');
            }

        });
        
        option = {  
            title: {  
                text: '医院采样情况',  
                x:'center'  
            },  
            tooltip: {
                trigger: 'item',
                formatter: '{b}<br/>{c} (个)'
            },
            dataRange:{  
                min:0,  
                max:500,  
                text:['高','低'],  
                realtime:true,  
                calculable:true,  
                color:['lightskyblue','yellow','orangered']
            },  
            series:[  
                {  
                    name:'采样情况',
                    type:'map',
                    map:'长沙',
                    data:[  
                        {name:'宁乡县',value:Math.round(Math.random()*500)},  
                        {name:'望城区',value:Math.round(Math.random()*500)},  
                        {name:'岳麓区',value:Math.round(Math.random()*500)},  
                        {name:'开福区',value:Math.round(Math.random()*500)},  
                        {name:'芙蓉区',value:Math.round(Math.random()*500)},  
                        {name:'雨花区',value:Math.round(Math.random()*500)},  
                        {name:'长沙县',value:Math.round(Math.random()*500)},
                        {name:'浏阳市',value:Math.round(Math.random()*500)},
                        {name:'天心区',value:Math.round(Math.random()*500)}
                    ],
                    label:{
                    	normal: {show: true},
                     	emphasis: {show: true}
                    }
                }  
            ],  
              
        };  
        myChart.setOption(option, true);  
});  
    </script>  
</body>  
</html>